home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Franz PD
/
Franz PD Disk #279 (1993)(Rhein-Sieg-Soft).zip
/
Franz PD Disk #279 (1993)(Rhein-Sieg-Soft).adf
/
ak_gen0-lib_V38.20.LHA
/
ak_gen0-library
/
Programmers.LHA
/
Programmers
/
Examples
/
FileReqMode.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-06-27
|
2KB
|
57 lines
/* FileReqMode V37.96 */
/* FREEWARE. */
/* (c) 1993 by Andreas R. Kleinert. */
/* Demonstrates how to switch the Library between : */
/* - "mixed mode" (depending on OS, which FileRequester). */
/* - "asl mode" (try to use "asl.library", first). */
/* - "akreq mode" (always use internal FileRequester). */
/* Written in SAS/C V6.00 for OS V2.04 (V37) Includes. */
#include <ak_gen0/ak_gen0_base.h>
#include <ak_gen0/ak_gen0_pragma.h>
#include <stdlib.h>
#include <string.h>
#include <proto/exec.h>
#include <proto/intuition.h>
void main(long argc, char **argv) /* MAIN */
{
IntuitionBase = (struct IntuitionBase *) OpenLibrary("intuition.library", 0);
/* will always be open because of version==0 */
printf("\nFileReqMode V37.96, FREEWARE, (c) 1993 by Andreas R. Kleinert.\n");
AKBase = (struct AKBase *) OpenLibrary("ak_gen0.library", 37);
if(AKBase)
{
if(!stricmp(argv[1], "OWN"))
{
AKBase->ak_FileReqFlags |= AKBF_ALWAYS_OWN; /* always use own */
AKBase->ak_FileReqFlags ^= AKBF_ALWAYS_ASL;
}else
{
if(!stricmp(argv[1], "ASL"))
{
AKBase->ak_FileReqFlags |= AKBF_ALWAYS_ASL; /* always try asl first */
AKBase->ak_FileReqFlags ^= AKBF_ALWAYS_OWN;
}else
{
AKBase->ak_FileReqFlags &= ~(AKBF_ALWAYS_OWN|AKBF_ALWAYS_ASL); /* mixed mode */
}
}
CloseLibrary((APTR) AKBase);
}else
{
printf("\n Can't open \42ak_gen0.library\42 V37+ !\n");
}
CloseLibrary((APTR) IntuitionBase);
exit(0);
}